<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%@page import="java.util.*, java.sql.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Specialization</title>
</head>
<body>
<%
	ResultSet rset = (ResultSet) request.getAttribute("crsSpecs");
	Vector<String> specializations = new Vector<String>();
	Vector<String> specializationsID = new Vector<String>();
	while(rset.next())
	{
		specializationsID.add(rset.getString("id"));
		specializations.add(rset.getString("specialization"));
	}
%>
	
	<c:forEach items="${formData}" var="line">
		<c:out value="${line}" /><br>
	</c:forEach>
	<br>
	<br>
	
	Please select your specialization
	
	<html:form action="/pages/students/Verification">
	
	<select name="degreeSpecialization">	
	<%
	for(int i=0; i<specializations.size(); i++)
	{ %>
		<option value="<%= specializations.get(i) %>#<%=specializationsID.get(i) %>"> <%= specializations.get(i) %></option>
	<% } %>
	
	</select>	
	<input type="submit" value="Click to Submit"/>
	</html:form>
	

</body>
</html>